package com.sushi.enums;

public enum BaseEnum {
    ;


    private String code;
    private String value;

    private BaseEnum() {
    }

    private BaseEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String parse(String code) {
        for (BaseEnum be : BaseEnum.values()) {
            if (be.code.equals(code)) {
                return be.value;
            }
        }
        return null;
    }
    private String getCode() {
        return code;
    }
    private void setCode(String code) {
        this.code = code;
    }
    private String getValue() {
        return value;
    }
    private void setValue(String value) {
        this.value = value;
    }
}
